﻿@page
@model BookLink.Pages.Books.CreateModel

@{
    ViewData["Title"] = "新增";

}

<h1>新增</h1>

<h4>图书</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form method="post" enctype="multipart/form-data">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="Book.Title" class="control-label"></label>
                <input asp-for="Book.Title" class="form-control" />
                <span asp-validation-for="Book.Title" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Book.ReleaseDate" class="control-label"></label>
                <input asp-for="Book.ReleaseDate" class="form-control" />
                <span asp-validation-for="Book.ReleaseDate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Book.Genre" class="control-label"></label>
                <input asp-for="Book.Genre" class="form-control" />
                <span asp-validation-for="Book.Genre" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Book.Dowloadlink" class="control-label"></label>
                <input asp-for="Book.Dowloadlink" class="form-control" />
                <span asp-validation-for="Book.Dowloadlink" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label class="control-label">封面上传</label>
                <div class="input-group">
                    <input type="file" class="form-control" asp-for="BookCover"  aria-describedby="inputGroupFileAddon04" aria-label="Upload">
                </div>
            </div>
            <div class="form-group">
                <label asp-for="Book.Author" class="control-label"></label>
                <input asp-for="Book.Author" class="form-control" />
                <span asp-validation-for="Book.Author" class="text-danger"></span>
            </div>

            <div class="form-group">
                <input type="submit" value="新增" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-page="Index">返回列表</a>
</div>

@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
    }
